<?php
  $title="Main";
  include "static/header.php";
  include "functions/db.php";	
?>
<body>
	<div id="container"><div id="padding">
		<div id=content>
			<div id=mainoptions>
			<noscript>
			We are sorry for any inconvenience, but this site will only work if javascript is turned on.<br/>Please turn on javascript and reload page.
			</noscript>
			</div><br/>
			<div id=mainform>
			</div><br/>
			<div id=maininfo>
<?php
	if (isset($_GET['activate'])) {
		$activateid = $_GET['activate'];
		$link = OpenSql();
		$subquery = "SELECT active FROM userlist WHERE activateid='$activateid' AND active=0";
		$subresult = mysql_query($subquery);
		if ($row = mysql_fetch_array($subresult))
		{
			$subquery = "UPDATE userlist SET active=1 WHERE activateid='$activateid' AND active=0";
			$subresult = mysql_query($subquery);   
			if ($subresult)
				echo "Congratulations! You have now been activated. Please login at your convenience.<br/><br/><br/>";
		}
		CloseSql($link);
	}
	?>
OpenSecrets 1.2. Created by InvulgoSoft.
<br/>
Copyright (C) 2010  Thomas Andersen<br/>
<br/>
This program is free software: you can redistribute it and/or modify<br/>
it under the terms of the GNU General Public License as published by<br/>
the Free Software Foundation, either version 3 of the License, or<br/>
(at your option) any later version.<br/>
<br/>
This program is distributed in the hope that it will be useful,<br/>
but WITHOUT ANY WARRANTY; without even the implied warranty of<br/>
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br/>
GNU General Public License for more details.<br/>
<br/>
You should have received a copy of the GNU General Public License<br/>
along with this program.  If not, see <http://www.gnu.org/licenses/>.<br/>
<br/>
<a href="http://www.gnu.org/licenses/gpl.html">GNU GENERAL PUBLIC LICENSE v3.0</a>
			</div>
			<script type="text/javascript">
				SendCheckSession();
			</script>

		</div>
	</div></div>
	<p id="footer">
		<div id="legal">
			Copyright (c) 2010 InvulgoSoft.
			<div id=developer>Developed by <a href='http://www.invulgo.dk'>InvulgoSoft</a></div>
		</div>  
	</p>
</body>